home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 1.1 KB | 60 lines | [TEXT/GEOL] |
- Item forwarded by BURBECK.S to ALCABES
-
- Item forwarded by MACAPP.TEST to SYMEONIDES.M
-
- Item 6363916 17-July-89 07:28
-
- From: CDA0004 VAR Shana Enterprises, Don Murphy
-
- To: MACAPP.TECH$ MACAPP Tech
-
- Sub: MPW Pascal bug!
-
- Hello Everyone,
-
- Here's a nasty little bug in mpw pascal 3.0 that might get you:
- (if you're listening, DTS, you've already heard this - Jon Zap 15-june)
-
-
- TYPE
- TFoo = OBJECT
- TBar = OBJECT (TFoo)
-
-
- PROCEDURE MakeFoo (VAR aFoo : TFoo);
- BEGIN
- NEW (aFoo)
- aFoo.IFoo;
- END;
-
-
- PROCEDURE MakeBar (VAR aBar : TBar);
- BEGIN
- NEW (aBar);
- aBar.IBar;
- END;
-
-
-
- PROCEDURE Anything;
- VAR
- aFoo : TFoo;
-
- BEGIN
- MakeFoo (aFoo); { Works fine. }
- MakeBar (TBar(aFoo)) { Invariably leaves aFoo unspecified }
- MakeFoo (TFoo(aFoo)) { Surprisingly bombs out as well }
- END;
-
-
- It seems that any type casting on the VAR parameter causes the result to get
- lost before it reaches the calling procedure.
-
- Oh well.
-
- Regards,
-
- Wayne Malkin
-
-
-